<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:92:"D:\fangcms\fangcms_city_add\public/../application/manage\view\collection_article\import.html";i:1496543859;s:80:"D:\fangcms\fangcms_city_add\public/../application/manage\view\public\header.html";i:1490355172;s:80:"D:\fangcms\fangcms_city_add\public/../application/manage\view\public\footer.html";i:1474280020;}*/ ?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__CSS__/style.css" rel="stylesheet"/>
	<title>管理中心</title>

</head>

<body>
<div id="J_ajax_loading" class="ajax_loading">加载中...</div>

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <?php if(!empty($sub_menu) OR !empty($big_menu)): if(!(empty($big_menu) || (($big_menu instanceof \think\Collection || $big_menu instanceof \think\Paginator ) && $big_menu->isEmpty()))): if(isset($normal)): ?>
        <a class="add fb" href="<?php echo $big_menu['iframe']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php else: ?>
    	<a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo $big_menu['iframe']; ?>" data-title="<?php echo $big_menu['title']; ?>" data-id="<?php echo $big_menu['id']; ?>" data-width="<?php echo $big_menu['width']; ?>" data-height="<?php echo $big_menu['height']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php endif; endif; if(!(empty($sub_menu) || (($sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator ) && $sub_menu->isEmpty()))): if(is_array($sub_menu) || $sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key;if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo $val['url']; ?>" class="<?php echo $val['class']; ?>"><em><?php echo $val['name']; ?></em></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; endif; ?>
    </div>
</div>

<!--导入文章-->
<div class="dialog_content">
    <?php if(!(empty($programList) || (($programList instanceof \think\Collection || $programList instanceof \think\Paginator ) && $programList->isEmpty()))): ?>
        <form name="myform" action="<?php echo url('importContent'); ?>" method="get" >
            <fieldset>
                <legend>发布方案列表</legend>
                    <table width="100%" class="table_form">
                        <tr>
                            <th>方案列表：</th>
                            <td>
                                <?php if(is_array($programList) || $programList instanceof \think\Collection || $programList instanceof \think\Paginator): $i = 0; $__LIST__ = $programList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                    <label style="width:150px" class="ib"><input type="radio" value="<?php echo $vo['id']; ?>" id="_<?php echo $vo['id']; ?>" name="programid" <?php if($vo['id'] == $programid): ?>checked<?php endif; ?>><?php echo cache('articleCate')['cate'][$vo['catid']]['name']; ?></label>
                                    <span style="margin-right:10px;"><a href="<?php echo url('importProgramDel',array('id'=>$vo['id'])); ?>" style="color:#ccc">删除</a></span>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </td>
                        </tr>
                        <tr>
                            <th>随机发布到其它栏目：</th>
                            <td><input type="checkbox" value="1" name="random" /></td>
                        </tr>
                        <tr>
                            <th>每天发布：</th>
                            <td><input type="text" name="sendnum" value="3" class="input-text" size="5" />篇</td>
                        </tr>
                        <tr>
                            <th>开始时间：</th>
                            <td>
                                <input type="radio" id="s1" value="1" name="stime" checked/><label for="s1">当前时间</label>
                                <input type="radio" id="s3" value="2" onclick="myCalendar('time_start');" name="stime"/><label  onclick="myCalendar('time_start');" for="s3">指定时间:</label>
                                <input type="text" name="time_start" id="time_start" onclick="myCalendar();" readonly class="date" size="12" value="">
                            </td>

                        </tr>
                        <tr>
                            <th>

                                <input type="hidden" name="nodeid" value="<?php echo $nodeid; ?>">
                                <input type="hidden" name="type" value="<?php echo $type; ?>">
                                <input type="hidden" name="ids" value="<?php echo $ids; ?>">
                            </th>
                            <td>
                                <input type="submit" class="btn btn_submit" name="" value="提交"/>
                            </td>
                        </tr>
                    </table>
            </fieldset>

        </form>
    <?php endif; ?>

    <form id="info_form" action="<?php echo url('importProgramAdd'); ?>" method="post">
        <fieldset>
            <legend>新建发布发案</legend>
                <table width="100%" class="table_form">
                    <tr>
                        <td width="120">选择分类：</td>
                        <td>
                            <select class="J_cate_select mr10" data-pid="0" data-uri="<?php echo url('ArticleCate/ajaxGetchilds'); ?>" data-selected=""></select>
                            <input type="hidden" name="cateid" id="J_cate_id" value="" />
                        </td>
                    </tr>
                    <tr>
                        <td>自动提取摘要：</td>
                        <td>
                            <label><input name="add_introduce" type="checkbox" checked  value="1">是否截取内容</label><input type="text" class="input-text" name="introcude_length" value="200" size="3">字符至内容摘要
                        </td>
                    </tr>
                    <tr>
                        <td>自动提取缩略图：</td>
                        <td>
                            <label><input type='checkbox' name='auto_thumb' checked value="1">是否获取内容第</label><input  type="text" name="auto_thumb_no" value="1" size="2" class="input-text">张图片作为标题图片
                        </td>
                    </tr>
                    <tr>
                        <td>导入文章状态：</td>
                        <td>
                            <input type="radio" value="1" checked="" id="_99" name="content_status">通过审核
                        </td>
                    </tr>
                </table>
                <input type="hidden" name="nodeid" value="<?php echo $nodeid; ?>">
                <input type="hidden" name="type" value="<?php echo $type; ?>">
                <input type="hidden" name="ids" value="<?php echo $ids; ?>">

        </fieldset>
        <fieldset>
            <legend>标签与数据库对应关系</legend>
            <div class="table_list">
                <table width="100%" cellspacing="0">
                    <thead>
                    <tr>
                        <th align="left">原数据库字段</th>
                        <th align="left">数据库字段说明</th>
                        <th align="left">标签字段（采集填充结果）</th>
                        <th align="left">处理函数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if(is_array($model) || $model instanceof \think\Collection || $model instanceof \think\Paginator): $i = 0; $__LIST__ = $model;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <tr>
                            <td align="left"><?php echo $key; ?></td>
                            <td align="left"><?php echo $vo; ?></td>
                            <td align="left"><input type="hidden" name="model_field[]" value="<?php echo $key; ?>">
                                <select name="node_field[]">
                                   <?php if(is_array($nodeField) || $nodeField instanceof \think\Collection || $nodeField instanceof \think\Paginator): if( count($nodeField)==0 ) : echo "" ;else: foreach($nodeField as $k=>$no): ?>
                                    <option value="<?php echo $k; ?>" <?php if($k == $key || ($key == 'info' and $k == 'content')): ?>selected="selected"<?php endif; ?>><?php echo $no; ?></option>
                                    <?php endforeach; endif; else: echo "" ;endif; ?>

                                </select>
                            </td>
                            <td align="left"><input type="text" name="funcs[]"  value="trim" class="input-text" size="10"></td>

                        </tr>
                    <?php endforeach; endif; else: echo "" ;endif; ?>

                    </tbody>
                </table>
                </div>
        </fieldset>

        <input type="submit" id="dosubmit"  class="btn btn_submit" value="提交" style="margin: 10px 0 10px 100px;;">
    </form>

</div>
<script src="__PUBLIC__/js/jquery.min.1.7.2.js"></script>
<script src="__JS__/manage.js"></script>
<script src="__JS__/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = '确定';
    d['cancelValue'] = '取消';
    d['title'] = '标题';
})($.dialog.defaults);
</script>
<script src="__PUBLIC__/js/plugins/formvalidator.js"></script>
<?php if(isset($list_table)): ?>
<script src="__PUBLIC__/js/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script>
<?php endif; ?>
<script src="__PUBLIC__/js/calendar/WdatePicker.js" charset="utf-8"></script>
<script>
$(function(){
    $('.J_cate_select').cate_select('请选择');
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#J_cate_id").formValidator({onshow:'请选择分类',onfocus:'请选择分类'}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"请选择分类"});
});
</script>